﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YY.Admin.Services.Service
{
    public class UserOutput : BindableBase
    {
        /// <summary>
        /// 账号
        /// </summary>
        [BindDescription("账号", ShowScheme.普通文本, "Auto", 0 )]
        public string Account { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [BindDescription("姓名", ShowScheme.普通文本, "1", 1)]
        public virtual string RealName { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [BindDescription("昵称", ShowScheme.普通文本, "Auto", 2)]
        public string? NickName { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        public string? Avatar { get; set; }

        /// <summary>
        /// 性别-男_1、女_2
        /// </summary>
        public GenderEnum Sex { get; set; }


        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime? Birthday { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }


        /// <summary>
        /// 手机号码
        /// </summary>
        public string? Phone { get; set; }

        /// <summary>
        /// 证件类型
        /// </summary>
        public CardTypeEnum CardType { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        public string? IdCardNum { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string? Email { get; set; }

        /// <summary>
        /// 文化程度
        /// </summary>
        public CultureLevelEnum CultureLevel { get; set; }

        /// <summary>
        /// 政治面貌
        /// </summary>
        public string? PoliticalOutlook { get; set; }

        /// <summary>
        /// 毕业院校
        /// </summary>
        public string? College { get; set; }

        /// <summary>
        /// 办公电话
        /// </summary>
        public string? OfficePhone { get; set; }

        /// <summary>
        /// 紧急联系人
        /// </summary>
        public string? EmergencyContact { get; set; }

        /// <summary>
        /// 紧急联系人电话
        /// </summary>
        public string? EmergencyPhone { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        private StatusEnum _status;
        public StatusEnum Status { get => _status; set => SetProperty(ref _status, value); }

        /// <summary>
        /// 账号类型
        /// </summary>
        public AccountTypeEnum AccountType { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 机构名称
        /// </summary>
        [BindDescription("机构名称", ShowScheme.普通文本, "Auto", 3)]
        public string OrgName { get; set; }

        /// <summary>
        /// 职位名称
        /// </summary>s
        [BindDescription("职位名称", ShowScheme.普通文本, "Auto", 4)]
        public string PosName { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        [BindDescription("角色名称", ShowScheme.普通文本, "Auto", 5)]
        public string RoleName { get; set; }

        private bool _isSelected;
        public bool IsSelected
        {
            get => _isSelected;
            set
            {
                if (SetProperty(ref _isSelected, value))
                {
                    //SelectionChanged?.Invoke(this, EventArgs.Empty);
                }
            }
        }

        // 添加主键ID，用于批量删除
        public long Id { get; set; }

        //public event EventHandler SelectionChanged;
    }
}
